package com.homework.controller;

import com.homework.entity.Information;
import com.homework.service.InformationService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class InformationController {
    @Resource
    private InformationService informationService;

    @RequestMapping("/findInformation")
    public List<Information> findAll(){
        return informationService.findAll();
    }

    @RequestMapping("/findNewInformation")
    public List<Information> findNewInformation(){
        return informationService.findNew();
    }
}
